package com.dcy.oa.convert;

import com.dcy.oa.vo.in.LeaveCreateInVO;
import com.dcy.oa.vo.in.LeaveMeSearchInVO;
import com.dcy.oa.vo.in.LeaveSearchInVO;
import com.dcy.oa.vo.in.LeaveUpdateInVO;
import com.dcy.oa.vo.out.LeaveListOutVO;
import com.dcy.oa.model.Leave;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @Author：dcy
 * @Description: 转换类
 * @Date: 2021-06-11
 */
@Mapper
public interface LeaveConvert {

    LeaveConvert INSTANCE = Mappers.getMapper(LeaveConvert.class);

    Leave toLeave(LeaveSearchInVO leaveSearchInVO);

    Leave toLeave(LeaveMeSearchInVO leaveMeSearchInVO);

    Leave toLeave(LeaveCreateInVO leaveCreateInVO);

    Leave toLeave(LeaveUpdateInVO leaveUpdateInVO);

    LeaveListOutVO toOut(Leave leave);

    List<LeaveListOutVO> toOutList(List<Leave> leaves);
}